<template>
  <custom-modal
    ref="createModal"
    v-if="visible"
    :width="width"
    :visible="visible"
    :title="$t('releaseNote')"
    :destroyOnClose="true"
    :fullscreen="true"
    :bodyStyle="{ height }"
    :attrs="{ dialogClass: 'ecuUpdateDetailDialog2' }"
    @cancel="handleCancel"
  >
    <template #title>
      <span>{{ $t('partUpdateDetail') }}</span>
    </template>
    <template #footer>
      <a-button type="primary" @click.stop="() => { visible = false }">{{ $t('back') }}</a-button>
    </template>
    <!-- <div class="ecuUpdateDetailContWrap" :style="{ height: '100%' }">
      <component
        :is="compName"
        :query="query"
        :time="time"
        :ecu-lists="ecuLists"
        :loading-base-info="loadingBaseInfoData"
      ></component>
      <dialog-cont></dialog-cont>
    </div> -->
    <dialog-cont :query="query"></dialog-cont>
  </custom-modal>
</template>
<script>
import DialogCont from './index.vue'
import CustomModal from '@/components/CustomModal/index.vue'
export default {
  components: {
    DialogCont,
    CustomModal
  },
  props: {
    width: {
      type: String,
      default: '50%'
    },
    height: {
      type: String,
      default: 'auto'
    },
    // 查询条件
    query: {
      type: Object,
      default () {
        return null
      }
    }
  },
  data () {
    return {
      visible: false,
      ecuLists: [],
      loadingBaseInfoData: false,
      time: 1587425
    }
  },
  mounted () {

  },
  methods: {
    handleCancel () {
      this.visible = false
    },
    switchVisible (val) {
      this.visible = val
    }
  }
}
</script>
<style lang="less" scoped>
.ecuUpdateDetailDialog {
  .switchLayout {
    margin-left: 10px;
    cursor: pointer;
  }
  .ecuUpdateDetailContWrap {
    // border-top: 1px solid @borderColor;
    // border-bottom: 1px solid @borderColor;
    overflow: auto;
  }
}
</style>
<style lang="less">
.ecuUpdateDetailDialog2 {
  .ant-modal-body {
    padding: 0;
  }
  .ant-modal-footer {
  }
}
</style>
